package com.oro.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.oro.dao.ClientiDao;
import com.oro.domain.Cliente;
import com.oro.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	@Autowired
	ClientiDao clientiDao;
	
	@Override
	public List<Cliente> getAllCustomers() {
		return clientiDao.getClienti();
	}

	public ClientiDao getClientiDao() {
		return clientiDao;
	}

	@Override
	public Cliente getCustomer(Long id) {
		return clientiDao.getCliente(id);
	}

	@Override
	public void save(Cliente cliente) {
		clientiDao.save(cliente);		
	}

	public void setClientiDao(ClientiDao clientiDao) {
		this.clientiDao = clientiDao;
	}

}
